<template>
<div>
<h1>图书展示页面</h1>
  <table border="1" align="center">
    <tr>
      <td>图书名称</td>
      <td>图书价格</td>
      <td>图书作者</td>
    </tr>
    <tr v-for="i in list">
      <td>{{i.bname}}</td>
      <td>{{i.bmoney}}</td>
      <td>{{i.waijian}}</td>
    </tr>

  <button @click="book">添加图书</button>
  </table>
</div>
</template>

<script>
export default {
name: "ad_3",
  data(){
  return{
        list:[]
  }
  },
  methods:{
  book(){
    this.$router.push('/add_book/')
  },
  show(){
    this.axios.get('user/Bbook/')
    .then(res=>{
      this.list = res.data.bbb
    })
  }
  },
  mounted() {
  this.show()
  }
}
</script>

<style scoped>

</style>
